#include "Hexagone.hpp"

using namespace std;
using namespace sf;

Hexagone::Hexagone()
{
    //ctor
}

Hexagone::Hexagone(float x,float y)
{
    this->setPointCount(6);
    this->setPoint(0,Vector2f((x+(H_LENGTH/2)),y));
    this->setPoint(1,Vector2f((x+H_LENGTH),(y+(H_HEIGHT/4))));
    this->setPoint(2,Vector2f((x+H_LENGTH),(y+((H_HEIGHT/4)*3))));
    this->setPoint(3,Vector2f((x+(H_LENGTH/2)),(y+H_HEIGHT)));
    this->setPoint(4,Vector2f(x,(y+((H_HEIGHT/4)*3))));
    this->setPoint(5,Vector2f(x,(y+(H_HEIGHT/4))));
}

Hexagone::Hexagone(const sf::Vector2f &position)
{
    this->setPointCount(6);
    this->setPoint(0,Vector2f((position.x+(H_LENGTH/2)),position.y));
    this->setPoint(1,Vector2f((position.x+H_LENGTH),(position.y+(H_HEIGHT/4))));
    this->setPoint(2,Vector2f((position.x+H_LENGTH),(position.y+((H_HEIGHT/4)*3))));
    this->setPoint(3,Vector2f((position.x+(H_LENGTH/2)),(position.y+H_HEIGHT)));
    this->setPoint(4,Vector2f(position.x,(position.y+((H_HEIGHT/4)*3))));
    this->setPoint(5,Vector2f(position.x,(position.y+(H_HEIGHT/4))));
}

Hexagone::~Hexagone()
{
    //dtor
}
